obj-m := rtai_threadripper.o
rtai_threadripper-objs := rtai_threadripper_main.o rtai_shmem.o

KERNEL_DIR ?= /lib/modules/$(shell uname -r)/build
RTAI_DIR ?= /usr/realtime

EXTRA_CFLAGS := -I$(RTAI_DIR)/include -I/lib/modules/$(shell uname -r)/build/include -I/lib/modules/$(shell uname -r)/build/arch/x86/include -std=gnu11
EXTRA_CFLAGS += -D__IN_RTAI__

all:
	make -C $(KERNEL_DIR) M=$(PWD) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" modules

clean:
	make -C $(KERNEL_DIR) M=$(PWD) clean


